package com.corp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.corp.entity.Customer;
import com.corp.framework.datasource.aop.MasterOnly;
import com.corp.mapper.CustomerMapper;
import com.corp.service.ICustomerService;
import org.springframework.stereotype.Service;

@Service
public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements ICustomerService {

    @Override
    public boolean add(Customer customer) {
        return this.save(customer);
    }

    @Override
    @MasterOnly
    public Customer getOne(Long id) {
        return this.getById(id);
    }
}